<!DOCTYPE html>
<html lang="en" style="font-size: 100px;">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        .bd {
            font-size: 0.12rem;
        }
        .content {
            padding: 10px 20px;
            font-size: 14px;
            line-height: 16px;
        }
        p {
            margin: 0;
            padding: 10px 0 5px;
            height: 20px;
            line-height: 20px;
        }
        p::after {
            float: left;
            content: '';
            margin: 6px;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #636060;

        }
        .triangle {
            width: 0;
            height: 0;
            border: 10px solid transparent;
            border-bottom-color: red;
        }
        .box {
            width: 200px;
            height: 100px;
            border: 2px solid #636068;
            padding: 20px 30px;
            margin: 5px;
            background: #d8c6f7;
        }
        .line {
            height: 1px;
            background: #ff0000;
            transform: scale(1, 0.5);
        }
        .border {
            margin-right: 10px;
            width: 240px;
            height: 200px;
            border: 1px solid #4c4747;
            position: relative;
        }
        .img1 {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            margin: auto;
        }
        .img2 {
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -50px;
            margin-top: -25px;
        }
        .img3 {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }
        .border2 {
            margin-right: 10px;
            width: 240px;
            height: 200px;
            border: 1px solid #4c4747;
            display: table-cell;
            vertical-align: middle;
            text-align: center;
        }
        .img4 {
        }
        .border3 {
            margin-right: 10px;
            width: 240px;
            height: 200px;
            border: 1px solid #4c4747;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .text1 {
            width: 200px;
            padding-bottom: 10px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .text2 {
            width: 200px;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
        }
        .mar {
            width: 100px;
            height: 50px;
            margin: 10px 0 3px 0;
        }
        .ov1 {

        }
        .lf {
            float: left;
            height: 30px;
            padding: 10px;
        }
        .clearfix:after {
            content: ""; 
            display: block;
            height: 0;
            clear: both;
            visibility: hidden;
        }
        .clearfix {
            zoom: 1;
        }
        .layout {
            border: 1px solid red;
        }
        .con {
            border: 1px solid blue;
        }
        .fl {
            float: left;
        }
        /* 正方体 */
        .wrapper{
            width: 100%; float: left;
            margin-bottom: 150px;
        }
        .cube{
            font-size: 4em;
            width:  2em;
            margin: 1.5em auto;
            transform-style:preserve-3d;
            transform:rotateX(-35deg) rotateY(30deg);
        }
        .side{
            position: absolute;
            width: 2em;
            height: 2em;
            background: rgba(255,99,71,0.6);
            border: 1px solid rgba(0,0,0,0.5);
            color: white;
            text-align: center;
            line-height: 2em;
        }
        .front{
            transform: translateZ(1em);
        }
        .bottom{
            transform: rotateX(-90deg) translateZ(1em);
        }
        .top{
            transform: rotateX(90deg) translateZ(1em);
        }
        .left{
            transform: rotateY(-90deg) translateZ(1em);
        }
        .right{
            transform: rotateY(90deg) translateZ(1em);
        }
        .back{
            transform: translateZ(-1em);
        }
        /* 正方体 */
        .tn {
            border: 1px solid blue;
        }
        .tian {
            float: left;
            box-sizing: border-box;
            border: 1px solid red;
            width: 50%;
            height: 50px;
        }
        .text-flex {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
        }
        .text-flex div {
            width: calc(50% - 2px);
            height: 50px;
            border: 1px solid red;
        }
    </style>
</head>
<body class="bd">
    <div class="content">
        <p>三角形</p>
        <div class="triangle"></div>
        <p>盒模型</p>
        <div class="box"></div>
        <p>画一条0.5px的线</p>
        <div class="line"></div>
        <p>垂直居中</p>
        <h5>1</h5>
        <div class="border">
            <image class="img1" src="ss.png"></image>
        </div>
        <h5>2</h5>
        <div class="border">
            <image class="img2" src="ss.png"></image>
        </div>
        <h5>3</h5>
        <div class="border">
            <image class="img3" src="ss.png"></image>
        </div>
        <h5>4</h5>
        <div class="border2">
            <image class="img4" src="ss.png"></image>
        </div>
        <h5>5</h5>
        <div class="border3">
            <image class="img5" src="ss.png"></image>
        </div>
        <p>文本省略号</p>
        <div class="text1">
            哈哈测试文本省略号，此处文字超长会出现省略号，哈哈哈哈哈哈哈，测试此处模块
        </div>
        <div class="text2">
            哈哈测试文本省略号，此处文字超长会出现省略号，哈哈哈哈哈哈哈，测试此处模块
        </div>
        <p>margin重叠问题</p>
        <div>
            <div class="mar"></div>
            <div class="mar"></div>
            <div class="mar"></div>
        </div>
        <p>浮动</p>
        <div class="ov1 clearfix">
            <div class="lf">哈哈</div>
            <div class="lf">哈哈</div>
            <div class="lf">哈哈</div>
        </div>
        <div>hehehee</div>
        <p>三栏布局</p>
        <div class="layout">
            <div class="con fl" style="width: 100px;">rtrtt</div>
            <div class="con fl" style="width: 120px;">rtrtrt</div>
            <div class="con" style="overflow: hidden;">hahaha哈哈哈哈hahaha哈哈哈哈测试布局测试布局哈哈哈哈测试布局测试布局哈哈哈哈</div>
        </div>
        <div class="layout">
            <div class="con fl" style="width: 100px;">rtrtt</div>
            <div class="con fl" style="width: 120px;">rtrtrt</div>
            <div class="con" style="margin-left: 224px;">hahaha哈哈哈哈hahaha哈哈哈哈测试布局测试布局哈哈哈哈测试布局测试布局哈哈哈哈</div>
        </div>
        <div class="layout" style="position: relative;">
            <div class="con" style="position: absolute; width: 100px;">rtrtt</div>
            <div class="con" style="position: absolute; left: 102px; width: 120px;">rtrtrt</div>
            <div class="con" style="position: absolute; left: 224px; ">hahaha哈哈哈哈hahaha哈哈哈哈测试布局测试布局哈哈哈哈测试布局测试布局哈哈哈哈</div>
        </div>
        <p>设置背景色，会对盒模型哪些模块上色</p>
        <div style=" width: 100px; height: 20px; border: 3px solid transparent; background: red;"></div>
        <p>内联元素</p>
        <div>哈哈哈啊<a>内联元素width、height无效，margin竖直方向无效，padding竖直方向设值的话不会不会吧其他元素挤掉，</a>哈哈哈</div>
        <!-- <p>立方体</p>
        <div class="wrapper">
            <div class="cube">
                <div class="side front"></div>
                <div class="side bottom"></div>
                <div class="side top"></div>
                <div class="side left"></div>
                <div class="side right"></div>
                <div class="side back"></div>
            </div>
        </div> -->
        <p>margin</p>
        <div style="position: relative; width: 100px; height: 100px; background: rgba(0, 0, 255, 0.5);">
            <div style="position: absolute; margin: 10px; padding: 5px; width: 80px; height: 80px; background: rgba(255, 0, 0, 0.5);">
                <div style="position: absolute; margin: 5px; padding: 5px; width: 50px; height: 50px; background: rgba(0, 255, 0, 0.5);"></div>
                <div></div>
            </div>
        </div>
        <div></div>
        <p>z-index</p>
        <div style="width:100px; height: 50px; background: red; position: relative; z-index: 1;">
            <div style="width: 50px; height: 30px; background: blue; position: absolute; z-index: 2"></div>
        </div>
        <p>田字布局</p>
        <div class="tn clearfix">
            <div class="tian"></div>
            <div class="tian"></div>
            <div class="tian"></div>
            <div class="tian"></div>
        </div>
        <div class="text-flex">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</body>
</html>